Skip to content

Containerise dependencies required to run tasks in dev workflow #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
May 1, 2025

Conversation

banjoh
Copy link
Member

@banjoh banjoh commented Apr 25, 2025

  • Add tasks to manage container dev environment
  • Update documentation to reflect new list of requirements
  • CI job to build and publish ghcr.io/replicatedhq/platform-examples/wg-easy-tools:latest image. The image is also tagged with sha-<commit>.

Copy link
Member

@chris-sanders chris-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to call out everywhere that there is 'docker' and then realized you've labeled that as 'to follow' so I stopped since that's still wip.

# GCP default configuration
GCP_PROJECT: '{{.GCP_PROJECT | default "replicated-qa"}}'
GCP_ZONE: '{{.GCP_ZONE | default "us-central1-a"}}'
VM_NAME: '{{.VM_NAME | default (printf "%s-dev" (or (env "GUSER") "user"))}}'

# Docker workflow configuration
IMAGE_NAME: ttl.sh/wg-easy-dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really shouldn't be using ttl.sh here, it's fine for development but it needs to be available somewhere else for the actual workflow. Is this currently just for you to test and you intend to move it later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently for test until we decide on

  • if we need to host this image. We need to weigh the need to host the image vs users needing to build the image which take a minute.
  • what OCI registry - docker hub? replicated? all of the above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we build the image and have it pushed to ghcr.io right here on this repo?
I'm fine with starting with a local build and following up with the auto-build on ghcr or if it's easy enough just build it anytime the Containerfile changes on merge to main.

I added a podman based image build/push on troubleshoot-mcp-server which might be very close to what you would need. https://github.com/chris-sanders/troubleshoot-mcp-server/blob/main/.github/workflows/publish-container.yaml

@banjoh banjoh changed the title Dockerise dependencies required to run tasks in dev workflow Containerise dependencies required to run tasks in dev workflow Apr 28, 2025
Copy link
Member

@chris-sanders chris-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments / questions / changes

Comment on lines 17 to 25
start:
desc: Start development container in background
silent: true
cmds:
- task: start-implementation

# Start development container in background.
# It's internal because it's used by shell and start tasks.
start-implementation:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following why can't this all just be in the "start" task? Task can call and require each other what does having an internal task buy you here if the real start task is just calling the internal one anyway?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've DRY'd this bit some more

Copy link
Contributor

@scottrigby scottrigby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few more suggestions

@banjoh banjoh force-pushed the em/dockerize-wg-easy-dependencies branch from 41ab16e to 3c23789 Compare April 29, 2025 13:44
banjoh added 7 commits April 29, 2025 14:44
Signed-off-by: Evans Mungai <[email protected]>
Signed-off-by: Evans Mungai <[email protected]>
Signed-off-by: Evans Mungai <[email protected]>
Signed-off-by: Evans Mungai <[email protected]>
When starting the development container, check if the image exists locally before
pulling or building it.

Signed-off-by: Evans Mungai <[email protected]>
dev:shell automatically builds the image if it doesn't exist locally

Signed-off-by: Evans Mungai <[email protected]>
@banjoh banjoh force-pushed the em/dockerize-wg-easy-dependencies branch from e1d26a8 to a3ef59e Compare April 30, 2025 14:21
Copy link
Member

@chris-sanders chris-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All my comments were addressed

@banjoh banjoh merged commit c36cb69 into main May 1, 2025
2 checks passed
@banjoh banjoh deleted the em/dockerize-wg-easy-dependencies branch May 1, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants